WDB Configuration
To configure WDB to your local environment and preferences you have to edit
the wdb.conf file in the conf directory (or wherever you copied it to).
But first you have to edit the second line of the wdb script (in /cgi-bin/)
:
$CONFIG_DIR = '/usr/local/etc/httpd/wdb';
Change the path to point to the directory where you installed the files in the
conf/ directory.
The WDB configuration file contains the following configuration parameters :
$formdir
This is the directory where the form definition files are located.
This directory doesn't need to be in the WWW document tree, but is
should be readable by the userid of the HTTP server. (this applies to
all files !)
$user
The database user to use for queries.
$pswd
The password for the database user. (Make sure that the wdb.conf
file are not readable by anybody who shouldn't ! )
$server
The database server name.
$MAIN_MENU
This should be set to a URL pointing to the main menu ("homepage")
for your WDB pages with links to all the query forms that you
create. This will be used for the 'Home' button in the WDB
screens. If you don't like this, simply remove the definition of
$MAIN_MENU.
$WDB_HTML
Base URL to the directory where you installed the files in html/
$IMAGEDIR
Base URL to the directory where the GIF buttons (html/*_btn.gif) are
installed. (Normally = $WDB_HTML)
$QUERY_HELP
This should be the URL for the
html/wdb_query_help.html file.
(Normally = $WDB_HTML/wdb_query_help.html ).
$rowcount
Maximum number of rows returned by a query. (The user has the option
to change this )
$MAXROWCOUNT
Maximum allowed value for $rowcount. (The user can't exceed this)
$DATEFORMAT
This is an optional configuration parameter to set the
dateformat. The format used is the same as for the Sybase SQL
command 'set dateformat', please refer to you Sybase manual for
details. (ex.: $DATEFORMAT = "dmy";
for European
date format Day/Month/Year)
$NULL_VALUE
The value to display for NULL fields (Normally = "")
%SPEC_NULL
This is an associative array of field types and special values that are
to be interpreted as NULL. For example :
%SPEC_NULL = ( 'int', -2147483647,
'smallint', -32768,
);
This tells WDB to interpret the value of -2147483647 (the smallest
possible value) in an int
field as NULL.
If you don't need this, simply remove the definition of %SPEC_NULL
from the configuration file.
$DBI_FILE
This is the name of the DBI (DataBase Interface) file. This file
defines the interface to the database. A file called 'syb_dbi.pl'
is supplied with WDB, which is the Sybase interface. This file could
be ported to support other database systems like Oracle, Informix, etc.
$debugfile
File to write debug output to when debug is enabled.
$debug
Set this variable to enable extra debug output in the $debugfile
and at the end of the HTML output. If you don't want this (probably
not!) simply remove the definition of $debug.
$helptext
This is a standard text that are displayed when an error occurs.
You might want to change the contact person etc.
sub html_tail
This is a small perl subroutine that print the HTML 'tail' at the end
of each HTML page generated by WDB. Please change the default email
address of the person to send comments to, and please keep the link
to the WDB homepage ( - or add it to one of your other pages, so I get
some credit .... :-)
The 'comments' script is included in the WDB distribution in the cgi-bin/ directory. If you want to use this feature
please install your own local copy of the script.
Send comments to
bfrasmus@eso.org (Bo F.R.)
......... Last update 2-Jan-1995